package user

import (
	"ginfwk/framework/core/gins"
	"net/http"
)

type AminUser struct {
	UserInfo
}

func (a *AminUser) Register(r gins.IRoutes) {
	g := r.Group("/user")
	{
		// 测试请求
		g.Match([]string{http.MethodGet, http.MethodPost}, "/info", a.UserInfo.GetAdminUserInfo)

		// 用户列表
		g.GET("/list", a.UserInfo.List)

		// 用户信息保存
		g.POST("/save", a.UserInfo.Save)

		// 用户删除
		g.POST("/delete", a.UserInfo.Delete)
	}
}
